#!/usr/bin/env bash
while true
do
## 北京列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w beijing | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf' 'beijing' > log/searchlist_beijing.log 2>&1 &
fi
echo ${python_pid}
#
## 上海列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w shanghai | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf' 'shanghai' > log/searchlist_shanghai.log 2>&1 &
fi
echo ${python_pid}

## 广东列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w guangdong | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf' 'guangdong' > log/searchlist_guangdong.log 2>&1 &
fi
echo ${python_pid}

# 辽宁列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w liaoning | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'liaoning' > log/searchlist_liaoning.log 2>&1 &
fi
echo ${python_pid}

# 山东列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w shandong | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'shandong' > log/searchlist_shandong.log 2>&1 &
fi
echo ${python_pid}

# 山西列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w shanxicu | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'shanxicu' > log/searchlist_shanxicu.log 2>&1 &
fi
echo ${python_pid}


## 福建列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w fujian | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'fujian' > log/searchlist_fujian.log 2>&1 &
fi
echo ${python_pid}

# 湖南列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w hunan | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'hunan' > log/searchlist_hunan.log 2>&1 &
fi
echo ${python_pid}

## 河南列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w henan | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'henan' > log/searchlist_henan.log 2>&1 &
fi
echo ${python_pid}

## 西藏列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w xizang | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'xizang' > log/searchlist_xizang.log 2>&1 &
fi
echo ${python_pid}


## 海南列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w hainan | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'hainan' > log/searchlist_hainan.log 2>&1 &
fi
echo ${python_pid}

# 河北列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w hebei | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'hebei' > log/searchlist_hebei.log 2>&1 &
fi
echo ${python_pid}

## 云南列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w yunnan | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'yunnan' > log/searchlist_yunnan.log 2>&1 &
fi
echo ${python_pid}

# 黑龙江列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w heilongjiang | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'heilongjiang' > log/searchlist_heilongjiang.log 2>&1 &
fi
echo ${python_pid}

# 新疆列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w xinjiang | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'xinjiang' > log/searchlist_xinjiang.log 2>&1 &
fi
echo ${python_pid}

# 广西列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w guangxi | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'guangxi' > log/searchlist_guangxi.log 2>&1 &
fi
echo ${python_pid}

# 四川列表页
#python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w sichuan | awk '{print $2;}'`
#if [ "$python_pid" == '' ]; then
#    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'sichuan' > log/searchlist_sichuan.log 2>&1 &
#fi
#echo ${python_pid}

## 湖北列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w hubei | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'hubei' > log/searchlist_hubei.log 2>&1 &
fi
echo ${python_pid}

# 安徽列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w anhui | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'anhui' > log/searchlist_anhui.log 2>&1 &
fi
echo ${python_pid}

# 浙江列表页
#python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w zhejiang | awk '{print $2;}'`
#if [ "$python_pid" == '' ]; then
#    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'zhejiang' > log/searchlist_zhejiang.log 2>&1 &
#fi
#echo ${python_pid}

# 江苏列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w jiangsu | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'jiangsu' > log/searchlist_jiangsu.log 2>&1 &
fi
echo ${python_pid}

# 陕西列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w shanxi | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'shanxi' > log/searchlist_shanxi.log 2>&1 &
fi
echo ${python_pid}

# 甘肃列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w gansu | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'gansu' > log/searchlist_gansu.log 2>&1 &
fi
echo ${python_pid}

# 吉林列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w jilin | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'jilin' > log/searchlist_jilin.log 2>&1 &
fi
echo ${python_pid}

# 贵州列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w guizhou | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'guizhou' > log/searchlist_guizhou.log 2>&1 &
fi
echo ${python_pid}

# 宁夏列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w ningxia | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'ningxia' > log/searchlist_ningxia.log 2>&1 &
fi
echo ${python_pid}

# 江西列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w jiangxi | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'jiangxi' > log/searchlist_jiangxi.log 2>&1 &
fi
echo ${python_pid}

# 内蒙古列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w neimenggu | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'neimenggu' > log/searchlist_neimenggu.log 2>&1 &
fi
echo ${python_pid}

# 天津列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w tianjin | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'tianjin' > log/searchlist_tianjin.log 2>&1 &
fi
echo ${python_pid}

# 青海列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w qinghai | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'qinghai' > log/searchlist_qinghai.log 2>&1 &
fi
echo ${python_pid}

# 重庆列表页
python_pid=`ps aux |grep start_task_crawler.py |grep python | grep -w cmb_gsxt_searchlist.conf | grep -w chongqing | awk '{print $2;}'`
if [ "$python_pid" == '' ]; then
    nohup python start_task_crawler.py 'config/cmb_gsxt_searchlist.conf'  'chongqing' > log/searchlist_chongqing.log 2>&1 &
fi
echo ${python_pid}


inter_time=10
sleep ${inter_time}
done